﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Easy.Operation;

namespace Easy.Web.Pages.EntityPages
{
    public partial class AddViewPage : System.Web.UI.Page
    {
        public string _EntityId;
        public string Prefix;
        public string EntityName;
        public string EntityDisplayName;
        public string edit = "0";//0新建 1修改
        public string options = "";
        public string ViewMapName = "";
        public string proname = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            this.GetParamter();

            Prefix = EntitySetting_Function.GetPrefix();

            
            EntityMap em = EntitySetting_Function.GetEntity(_EntityId);
            EntityName = em.EntityName;
            EntityDisplayName = em.EntityDisplayName;

            
            //List<AttributeMap> List = EntitySetting_Function.GetAttributeList(_EntityId);
            //foreach (AttributeMap item in List)
            //{
            //    options += "<option value='" + item.name + "'>" + item.DisplayName + "</option>";

            //}
        }

        private void GetParamter()
        {
            if (Page.Request["id"] != null)
            {
                _EntityId = Page.Request["id"];


            }


            if (Page.Request["ViewMapName"] != null)
            {
                ViewMapName = Page.Request["ViewMapName"];

                edit = "1";
            }
        }
    }
}